package com.atdel.demo02;


/**
 * @BelongsProject: java_study
 * @BelongsPackage: com.atdel.demo02
 * @Author: Del
 * @CreateTime: 2025-03-03  19:01
 * @Description: TODO
 * @Version: 1.0
 */
// 动物基类
abstract class Animal {
    private String name;

    public Animal(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    // 动物被打猎时会跑
    public abstract void run();
}





